<template>
  <div class="card-items">
    <div class="title">
      <img src="@/assets/van-img.png" alt="" />
      <span>全省情况</span>
    </div>
    <radarEcharts :chartObj="chartObj" :cindex="index1" />
  </div>
</template>

<script>
import { reactive, toRefs, onMounted } from "vue";
import radarEcharts from "@/components/radarEcharts.vue";
export default {
  components: {
    radarEcharts,
  },
  props: ["radarObj"],
  setup(props, { emit }) {
    const item = props.radarObj;
    console.log(props.radarObj);
    const state = reactive({
      index1: 1,
      chartObj: item,
    });

    onMounted(() => {
      // state.chartObj = {
      //   title: "饼状图",
      //   names: ["专线", "物联网", "企宽", "IDC", "移动云"],
      //   values: ["98", "95", "97", "99", "99.4"],
      // };
    });
    return {
      ...toRefs(state),
    };
  },
};
</script>
<style lang="scss" scoped>
.card-items {
  margin: 10px;
  width: calc(100% - 20px);
  height: 330px;
  background-color: #fff;
  border-radius: 5px;
  padding: 10px 0 2px 10px;
  margin-bottom: 10px;
  .title {
    width: 100%;
    display: flex;
    align-items: center;
    span {
      font-size: 16px;
      font-weight: 400;
      color: #333333;
    }
  }
  .tab-btn {
    width: calc(100% - 8px);
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 8px 0 0 8px;
    overflow-x: auto;
    .btn-select {
      padding: 6px 13px;
      background: linear-gradient(285deg, #fe6800 0%, #ff9900 100%);
      border-radius: 12px;
      color: #ffffff;
      white-space: nowrap;
      font-size: 13px;
      margin-right: 4px;
    }
    .btn-unselect {
      padding: 6px 13px;
      background: #f3f3f3;
      border-radius: 12px;
      color: #333333;
      white-space: nowrap;
      font-size: 13px;
      margin-right: 4px;
    }
  }
  .desc-panel {
    width: 100%;
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    .left-desc {
      font-size: 14px;
      .text1 {
        font-size: 14px;
        font-weight: 400;
        color: #333333;
        margin-right: 6px;
      }
      .text2 {
        font-size: 21px;
        font-weight: bold;
        color: #333333;
        margin-right: 6px;
      }
    }
    .right-desc {
      padding: 0 10px;
      height: 24px;
      line-height: 24px;
      margin-right: 10px;
      background: #fff0dc;
      color: #333333;
      border-radius: 4px;
      font-size: 12px;
      text-align: center;
    }
  }
}
</style>
